<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="test" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="aa" uri="/WEB-INF/tld/ajaxanywhere.tld" %>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <title>page</title>
    <link href="//unpkg.com/layui@2.7.6/dist/css/layui.css" rel="stylesheet"/>
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <script src="//unpkg.com/layui@2.7.6/dist/layui.js"></script>
    <script src="/aa.js"></script>
</head>
<body>
<h1>${msg}</h1>
<br />
<aa:zone name="zoneJ">
<table class="layui-table" lay-filter="test">
    <thead>
    <tr>
        <th>姓名</th>
        <th>电话</th>
    </tr>
    </thead>
    <tbody>
        <c:forEach items="${page.list}" var="vo">
            <tr>
                <td>${vo.name}</td>
                <td>${vo.tel}</td>
            </tr>
        </c:forEach>
  
    </tbody>
</table>
<%-----${page.maxPage}-----%>
<%--maxPage="${page.maxPage}"  tags 传值maxPage接收不到，原因不明--%>
<test:Page pageNo="${page.pageNo}" pageSize="${page.pageSize}"
           total="${page.count}" maxGroup="5" maxPage="10"/>
</aa:zone>
</body>
<script type="text/javascript">
    $(document).on('click', '.page', function () {
        const $this = $(this);
        if (!$.isNumeric($this.attr("data-pageNo"))){
		    return;
		}
        ajaxAnywhere.getAJAX('/j/pageList?pageNo=' + $this.attr("data-pageNo"), 'zoneJ');
    });
</script>
</html>